public class animals {
      public String name;//动物名字
      public String color;//动物颜色
    public void diet(){
        System.out.println(name+":会吃草");
    }
    public void behavior(){
        System.out.println(name+":喜欢爬树");
    }
    public static void main(String[] args) {
        PetDog dog1=new PetDog();
        dog1.name="小黑";
        dog1.color="黑色";
        dog1.barks();
        dog1.wags();
        PetDog dog2=new PetDog();
        dog2.name="小白";
        dog2.color="白色";
        dog2.barks();
        dog2.wags();
    }
}
